package com.guigu.zj.controller;

import com.guigu.mapper.MakesetupMapper;
import com.guigu.pojo.Makesetup;
import com.guigu.zj.service.MakeSetupService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class MakeSetUpController {
    @Autowired
    MakesetupMapper makesetupMapper;
    @Autowired
    MakeSetupService makeSetupService;
    @RequestMapping("/Z_addYy")
    public int addYy(@RequestBody Makesetup makesetup){
        return makesetupMapper.insertSelective(makesetup);
    }
    @RequestMapping("/Z_queryYy")
    public Makesetup queryYy(@RequestBody Makesetup makesetup){
        return makesetupMapper.queryByMakedate(makesetup);
    }
    @RequestMapping("/Z_countsDate")
    public int countsDate(@RequestBody Makesetup makesetup){
        return makeSetupService.countDate(makesetup.getMakedate());
    }
    @RequestMapping("/Z_updateMakeDate")
    public int updateMakeDate(@RequestBody Makesetup makesetup){
        return makeSetupService.updateMakeDate(makesetup);
    }
}
